

package com.hazelcast.config.security;

import com.hazelcast.security.ICredentialsFactory;

/**
 * This interface represents identity configuration in security realms or client security configurations. It provides a method
 * to convert the configuration into a {@link ICredentialsFactory} instance.
 */
public interface IdentityConfig {

    /**
     * Converts current configuration to a {@link ICredentialsFactory} instance.
     *
     * @param cl class loader to be used if the credentials factory class has to be constructed.
     * @return {@link ICredentialsFactory} instance
     */
    ICredentialsFactory asCredentialsFactory(ClassLoader cl);

    /**
     * Makes a copy (or clone) of the config object.
     */
    IdentityConfig copy();
}
